package cn.tedu.charging.device.dao.mapper;

import cn.tedu.charging.device.pojo.po.GunPO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GunMapper extends BaseMapper<GunPO> {
    @Select("select gun.* from charging_gun_info gun \n" +
            "left join charging_pile_info pile\n" +
            "on pile.id=gun.pile_id\n" +
            "where pile.station_id=#{stationId}")
    List<GunPO> selectGunsByStationId(Integer stationId);
}
